.TH tag 1 "June 5, 2008" "version 0.0" "USER COMMANDS"
.SH NAME
tag \- add, manage and print tags (labels) associated with files
.SH SYNOPSIS
.B tag
TAG [FILE]...
.br
.B tag
\-c|\-\-cloud [FILE]...
.br
.B tag
[\-t|\-\-tag TAG] [\-u|\-\-untag TAG] [\-U TAG] [\-d|\-\-delete\-tag TAG] [FILE]...
.br
.B tag
[\-l|\-\-list|\-L|\-\-list\-print0 TAG] [FILE]...
.br
.B tag
\-m|\-\-move TAG DEST
.SH DESCRIPTION
.TP
\-c, \-\-cloud
Prints sum of tags associated with supplied files or all tags in the database when no filenames are supplied.
.TP
\-d, \-\-delete\-tag TAG
Removes TAG.
.TP
\-l, \-\-list TAGLIST
Lists all file paths tagged with at least one of the tags from TAGLIST. TAGLIST is a list of tags separated by comma.
.TP
\-L, \-\-list-print0 TAGLIST
Same as above but each file path is followed by \\0.
.TP
\-m, \-\-move TAG
Moves all files with TAG to the first directory selected by path supplied after options (does nothing if it's not a directory)
.TP
\-r, \-\-recursive
This argument causes that tagging and untagging works recursively on directories. Default behaviour is to tag directory file.
.TP
\-t, \-\-tag TAG
Associates TAG with file.
.TP
\-u, \-\-untag TAG
Removes TAG association with file.
.TP
\-U
Removes all tag association with file.
.SH EXAMPLES
.
.PP
.B Tag files 'slides.pdf' and 'summary.txt' with 'math':
.nf
tag -t math slides.pdf summary.txt
.fi
.
.PP
.B Same as above but not using -t argument:
.nf
tag math slides.pdf summary.txt
.fi
.
.PP
.B Remove 'math' tag, and add 'physics' tag to 'slides.pdf' file:
.nf
tag -d math -t physics slides.pdf
.fi
.
.PP
.B Tag file 'General relativity.pdf' with 'physics' and then tag file 'results.ps' with the same tag 'physics':
.nf
tag physics 'General relativity.pdf'
tag . results.ps
.fi
.
.PP
.B Move files tagged with 'music' to directory 'Desktop/Music' while preserving tags associations:
.nf
tag -m music Desktop/Music
.fi
.
.PP
.B Deletes all associations with tag 'stuff' (deleting this tag):
.nf
tag -D stuff
.fi
.
.PP
.B Deletes all tags associations with file 'talk.pdf':
.nf
tag -U talk.pdf
.fi
.
.PP
.B Passes all file paths tagged with 'stuff' to 'ls -lda' command:
.nf
ls -lda `tag -l stuff`
.fi
.
.PP
.B Comfortable way to pass all files tagged with 'metal' and 'rock' to 'xmms -e' command:
.nf
tagexec metal,rock xmms -e
.fi
.
.PP
.B Same as above but using directly 'tag' and 'xargs' commands (not using 'tagexec'):
.nf
tag -L metal,rock | xargs -0 xmms -e
.fi
.SH AUTHOR
Andrzej Rutkowski (andrzej.rutkowski+code (at) gmail.com)
